﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
namespace mscook.mvc.Models
{
    public class ChangePasswordModel:CenterBaseModel
    {
        [Required(ErrorMessage="原始密码必填")]
        public string OldPaasword
        {
            set;
            get;
        }

        [Required(ErrorMessage = "密码必填")]
        [StringLength(20, MinimumLength = 8, ErrorMessage = "新密码必须为8-20位")]
        public string NewPassword
        {
            set;
            get;
        }

        [Required(ErrorMessage = "密码必填")]
        [StringLength(20, MinimumLength = 8, ErrorMessage = "新密码必须为8-20位")]
        public string ConfirmPassword
        {
            set;
            get;
        }

    

        public bool IsEqual()
        {
            return ConfirmPassword.Equals(NewPassword);
        }
    }
}